home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{5A65A9C0-089F-11D2-88AD-0000B45C4CF6}#1.0#0"; "EASYX.OCX"
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 2430
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4485
- LinkTopic = "Form1"
- ScaleHeight = 2430
- ScaleWidth = 4485
- StartUpPosition = 3 'Windows Default
- Begin VB.Frame Frame2
- Caption = "Streaming sounds"
- Height = 2175
- Left = 2400
- TabIndex = 4
- Top = 120
- Width = 1935
- Begin VB.CommandButton cmdStopStream
- Caption = "Stop Streaming Sound"
- Enabled = 0 'False
- Height = 495
- Left = 360
- TabIndex = 6
- Top = 1200
- Width = 1215
- End
- Begin VB.CommandButton cmdStream
- Caption = "Play Streaming sound"
- Height = 495
- Left = 360
- TabIndex = 5
- Top = 480
- Width = 1215
- End
- End
- Begin VB.Frame Frame1
- Caption = "Static sounds"
- Height = 2175
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 1815
- Begin VB.CommandButton cmdStaticPlayDup
- Caption = "Play Duplicate"
- Enabled = 0 'False
- Height = 495
- Left = 240
- TabIndex = 3
- Top = 1440
- Width = 1215
- End
- Begin VB.CommandButton cmdStaticDuplicate
- Caption = "Duplicate Static sound"
- Height = 495
- Left = 240
- TabIndex = 2
- Top = 840
- Width = 1215
- End
- Begin VB.CommandButton cmdStatic
- Caption = "Play &Static sound"
- Height = 495
- Left = 240
- TabIndex = 1
- Top = 240
- Width = 1215
- End
- End
- Begin PROJECTEXLibCtl.EasyX EasyX1
- Left = 1320
- OleObjectBlob = "Form1.frx":0000
- Top = 600
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim StaticSound As Long
- Dim StaticDuplicate As Long
- Dim StreamSound As Long
- Private Sub cmdStatic_Click()
- EasyX1.PlayStaticSound StaticSound, 0
- End Sub
- Private Sub cmdStaticDuplicate_Click()
- StaticDuplicate = EasyX1.DuplicateStaticSound(StaticSound)
- cmdStaticPlayDup.Enabled = True
- End Sub
- Private Sub cmdStaticPlayDup_Click()
- EasyX1.PlayStaticSound StaticDuplicate, 0
- End Sub
- Private Sub cmdStopStream_Click()
- cmdStopStream.Enabled = False
- EasyX1.StopStreamingSound StreamSound
- End Sub
- Private Sub cmdStream_Click()
- EasyX1.PlayStreamingSound StreamSound, 0
- cmdStopStream.Enabled = True
- End Sub
- Private Sub Form_Load()
- Dim rt As Long
- Dim AppPath As String
- '''do not forget this
- EasyX1.Window = Me.hWnd
- ''''''''''''''''''''''''
- 'initialize sound
- rt = EasyX1.InitializeSound()
- If rt <> EX_OK Then
- MsgBox "Sound could initialize", vbOKOnly
- Unload Me
- Exit Sub
- End If
- AppPath = App.Path & "\"
- 'load sounds
- StaticSound = EasyX1.CreateStaticSound(AppPath & "boink.wav")
- If StaticSound < 0 Then
- MsgBox "Static sound could not be loaded", vbOKOnly
- cmdStatic.Enabled = False
- End If
- StreamSound = EasyX1.CreateStreamingSound(AppPath & "countdown.wav")
- If StreamSound < 0 Then
- MsgBox "Static sound could not be loaded", vbOKOnly
- cmdStream.Enabled = False
- End If
- End Sub
-